package com.ruoyi.project.lely.bean.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

/**
 * 文件存储
 *
 * @author luoyong
 */
@Data
@ApiModel("文件存储 入参DTO")
public class LyStorageDTO {

    @ApiModelProperty("ID")
    private Long id;

    @Length(max = 63, message = "文件的唯一索引长度不能超过63位")
    @NotEmpty
    @ApiModelProperty("文件的唯一索引")
    private String key;

    @Length(max = 255, message = "文件名长度不能超过255位")
    @NotEmpty
    @ApiModelProperty("文件名")
    private String name;

    @Length(max = 20, message = "文件类型长度不能超过20位")
    @NotEmpty
    @ApiModelProperty("文件类型")
    private String type;

    @NotNull
    @ApiModelProperty("文件大小")
    private Integer size;

    @Length(max = 255, message = "文件访问链接长度不能超过255位")
    @ApiModelProperty("文件访问链接")
    private String url;

}
